package Day08.Demo04;

/**
 * @author hyhWTX
 * @version 1.0
 * @date 2022年02月27日 12:38
 */



public class Demo03Math {
    public static void main(String[] args) {
        //获得绝对值
        System.out.println(Math.abs(3.14));
        System.out.println(Math.abs(0));
        System.out.println(Math.abs(78.6));
        System.out.println("=================");
        //向上取整
        System.out.println(Math.ceil(96.8));
        System.out.println(Math.ceil(3.4));
        System.out.println(Math.ceil(8.3));
        System.out.println("=================");
        //向下取整
        System.out.println(Math.floor(89.3));
        System.out.println(Math.floor(78.2));
        System.out.println(Math.floor(41.2));
        System.out.println("=================");
        //绝对值
        System.out.println(Math.round(89.5));
        System.out.println(Math.round(45.23));
        System.out.println(Math.round(12.3));
        //圆周率
        System.out.println(Math.PI);

    }
}
